<style>
    .xzje-com-l {
        padding-left: 0px;
    }

    .xzje-com-r {
        padding-right: 0px;
    }
</style>
<script src="/static/bootstrap-3.3.7-dist/table/bootstrapValidator.min.js"></script>
<link href="/static/toastr/toastr.css" rel="stylesheet"/>
<script src="/static/toastr/toastr.min.js"></script>
<div style="padding: 10px 10px 10px 10px">
    <form id="page_form" name="page_form">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="new_page_title" style="font-size: xx-large;">AUTO</h4>
            </div>

            <div class="row">
                <div class="col-md-12">
                    <label for="txt_departmentname" class="label-form-group-title-item"
                           style="margin-top: 10px; margin-left: 15px; margin-bottom: -10px;">下注金额 :</label>
                </div>
            </div>
            <div class="row">
                <div class="col-md-3 xzje-com-r">
                    <div class="modal-body">
                        <div class="form-group div-form-group">
                            <div class="input-group">
                                <span class="input-group-addon">1</span>
                                <input type="number" min="1" class="form-control input-form-group-value-item"
                                       id="bet_amount_a"
                                       placeholder="">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button id="btn_confirm_bet" type="button" class="btn btn-primary" data-loading-text="正在下注..."
                        autocomplete="off">
                    <i class="fa fa-floppy-o" aria-hidden="true"></i>
                    确认下注
                </button>
            </div>
        </div>
    </form>
</div>
<script>
(function ($, win) {
    $("#btn_confirm_bet").click(function () {
        if (isEmpty($("#bet_amount_a").val())) {
            return toastr.error('请填写下注金额');
        }
        var params = {
            method: 'post',
            url: '../crawler/gys',
            data: {"betNum": $("#bet_amount_a").val()}
        };
        httpClient(params);
    });

    function setVal () {
        var params = {
            method: 'get',
            url: '../crawler/get',
            callback: function (o) {
                $("#bet_amount_a").val(o.betNum)
            }
        };
        httpClient(params);
    }

    function init () {
        setVal();
    }

    init();
    win.httpClientSuccess = function (data) {
    }
})(jQuery, window)
</script>